home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK2.toast / Development Kits (Disc 2) / Telephone Manager / Documentation / Developer Notes / Text-to-Speech ReadMe
Encoding:
Text File  |  1995-03-20  |  943 b   |  26 lines  |  [TEXT/MPS ]

  1. // snippet setting a speech channel to output to geoport handset
  2.  
  3. SpeechChannel theChannel;
  4. Component soundOutput;
  5. char *welcome = "Welcome to MacinTalk!";
  6.  
  7. err = NewSpeechChannel(nil,&theSpeechChannel);  
  8. err = TELGetHSSoundOutput(termHandle,&soundOutput);
  9. err = SetSpeechInfo(theSpeechChannel,soSoundOutput,&soundOutput);
  10. err = SpeakText(theSpeechChannel,welcome,strlen(welcome));
  11. // talking happens async...
  12.  
  13.  
  14. -- What follows is a first attempt at what could be added to Inside Macintosh on 
  15.    Page 4-44 right before soSpeechDoneCallBack.
  16.  
  17. soSoundOutput
  18.  
  19. Change the output device of a speech channel.  The speechInfo parameter is a 
  20. pointer to a Component.  The existing sound channel within the speech channel will
  21. be closed and a new channel will be opened using the specified sound output 
  22. component.
  23.  
  24. This selector works with the SetSpeechInfo function and might move memory.  Your 
  25. application should not invoke it at interrupt time.
  26.